printing tokens in c hackerrank solution